package com.fourGirlsAndADude.mobileDRT;

import android.util.Log;

public class CountDown {

	// Used to hold the amount of time in seconds that the timer is allowed to
	// run before the time is up
	private final int timeOver = 900;
	
	// Used to hold the number of minutes that the timer has been running
	private int currentTime;
	
	public CountDown() {
		intializeTimer();
	}

	//Starts the timer 
	private void intializeTimer() {
		while (true) {
			try {
				Thread.sleep(1000);
				currentTime++;
				Log.d("Check for CountDown", "currentTime" + currentTime);
			} catch (InterruptedException e) {

			}
		}
	}
	
	//Resets the timer
	public void reset() {
		currentTime = 0;
	}
	
	//Allows to check and see if the alloted time is over
	public boolean isTimeUp() {
		if (currentTime == timeOver) {
			return true;
		}
		return false;

	}

}
